<script type="text/javascript">
function loadCategory(parent_id)
    {
        $('category2').set('disabled',true);
        var request = new Request.JSON({
            method : 'post',
            content : 'charset=UTF-8',
            url : en4.core.baseUrl + 'exams/ajax/loadcategory',
            data :
            {
                'parent_id' : parent_id
            },
            onComplete : function(responseObject)
            {
                var str="";
                for(var i = 0; i < responseObject.length; i++)
                {
                    str += '<option value="'+responseObject[i]['category_id']+'">'+responseObject[i]['category_name']+'</option>';
                }
                $('category2').set('html',str);
                $('category2').set('disabled',false);
            }
        });
        request.send();
    };
</script>
<?php if( $this->form ): ?>
  <?php echo $this->form->render($this) ?>
<?php endif ?>
